package miku.firstgame.manager
{
	import com.saia.starlingPunk.SPEngine;

	import miku.firstgame.command.StartUpCommand;
	import miku.firstgame.constrants.CommandConstrants;

	import org.puremvc.as3.patterns.facade.Facade;

	public class AppFacade extends Facade
	{
		public function AppFacade()
		{
			super();
		}

		public static function getInstance():AppFacade
		{
			if (instance == null)
			{
				instance = new AppFacade();
			}

			return instance as AppFacade;
		}

		override protected function initializeController():void
		{
			super.initializeController();
			registerCommand(CommandConstrants.START_UP_COMMAND, StartUpCommand);
		}

		public function startup(app:SPEngine):void
		{
			sendNotification(CommandConstrants.START_UP_COMMAND, app);

		}
	}
}
